/********************************************************************************
 *      Copyright:  (C) 2022 xiezongyi<1764417007@qq.com>
 *                  All rights reserved.
 *
 *       Filename:  iniparser_pub.h
 *    Description:  This head file 
 *
 *        Version:  1.0.0(04/05/22)
 *         Author:  xiezongyi <1764417007@qq.com>
 *      ChangeLog:  1, Release initial version on "04/05/22 09:03:03"
 *                 
 ********************************************************************************/

#ifndef _MOSQUITTO_CONF_H_
#define _MOSQUITTO_CONF_H_

#include "sqlite3.h"

//打包结构体
typedef struct mqtt_ctx_s
{

	char        		clientid[128];
	char        		hostname[128];
	char        		pubtopic[128];
	char        		subtopic[128];
	char        		username[128];
	char        		passwd[128];
	char				platform[128];
	char				buf_json[128];
	char				buff[128];
	int         		port;
	int					limit_time;

	sqlite3				*db;

}mqtt_ctx_t;


//解析配置文件
//注意：结构体先定义，再使用
int get_mqtt_conf(mqtt_ctx_t *mqtt);

#endif
